/**
 * 功能描述
 */
define(function (require, exports, module) {
    //引入视图基类
    var ELView = require("elview");
    var aw = require("ajaxwrapper");
    //assets
    var template = require("./assets/tpl/allianceconfirm_main.tpl");
//    require("./assets/css/checkin_main.css");

    //business
    //component
    var allianceSubnavComp = require("./component/allianceSubnavComp");
    var allianceGridComp = require("./component/allianceGridComp");
    var allianceFormComp = require("./component/allianceFormComp");
    var allianceEditGridComp=require("./component/allianceEditGridComp");
    //constant

    //handler

    //store
    var checkinfile = require("./store/allianceconfirmStore");
    
    var checkin_main = ELView.extend({
        attrs: {
        	model:{},
            template: template
        },
        initComponent:function (params, widget) {
        	allianceSubnavComp.initComponent(params, widget);
        	allianceGridComp.initComponent(params, widget);
        	allianceFormComp.initComponent(params, widget);
        	allianceEditGridComp.initComponent(params, widget);
        },
        afterInitComponent: function (params, widget) {
        	var subnav = widget.get("subnav");
        	widget.get("grid").refresh({
        		"checkInTypeIn": "Alliance",
        		"planItemGroup.alliance":false,
				"planItemGroup.servicePoint":subnav.getValue("servicepoint"),
				"planItemGroup.planItem.startDate": subnav.getValue("checkInDate").start,
				"planItemGroup.planItem.startDateEnd": subnav.getValue("checkInDate").end,
				"planItemGroup.checkInStatusIn": subnav.getValue("CheckInStatus"),
				fetchProperties:checkinfile.getGridFetchProperties()
        	});
        
        }
    });

    module.exports = checkin_main;
});
